package com.zx.map.service;

import com.zx.map.dao.model.OrdLog;
import com.zx.map.service.domain.OrdLogDomain;
import com.zx.map.service.model.AgentInfoModel;
import com.zx.map.service.model.OrdLogModel;
import org.springframework.dao.DataAccessException;

import java.util.List;
import java.util.Map;

/**
 * Created by IntelliJ IDEA. User: Administrator Date: 14-3-1 Time: 上午11:06 To
 * change this template use File | Settings | File Templates.
 */
public interface OrdLogService {

    /**
     * 查找所有数据列表
     *
     * @return
     * @throws DataAccessException
     */
    public List getAllList() throws DataAccessException;

    /**
     * 根据单Key查找Model
     *
     * @param key
     * @return
     * @throws DataAccessException
     */
    public OrdLogModel getModelByKey(String key) throws DataAccessException;

    /**
     * 根据单Key查找Model 并增加行锁
     */
    public OrdLogModel selectByPrimaryKeyAndLineLock(String key) throws DataAccessException;

    /**
     * 根据Model查找列表
     *
     * @param model
     * @return
     * @throws DataAccessException
     */
    public List<OrdLogModel> getListByModel(OrdLogModel model) throws DataAccessException;

    /**
     * 单表查询
     * @param ordLog
     * @return
     */
    public List<OrdLog> getListByRecord(OrdLog ordLog);

    /**
     * 新增并返回主键
     *
     * @param model
     * @return
     * @throws DataAccessException
     */
    public String add(OrdLogModel model) throws DataAccessException;

    /**
     * 更新并返回主键
     *
     * @param model
     * @throws DataAccessException
     */
    public String update(OrdLogModel model) throws DataAccessException;

    /**
     * 删除
     *
     * @param model
     * @return
     * @throws DataAccessException
     */
    public void delete(OrdLogModel model) throws DataAccessException;

    /**
     * 分页查询
     *
     * @param pageSize
     * @param pageNum
     * @param domain
     * @return
     * @throws DataAccessException
     */
    public Map getPageByDomain(AgentInfoModel curAgentInfoModel,
                               OrdLogDomain domain) throws DataAccessException;

    /**
     * 大额订单监控
     *
     * @param pageSize
     * @param pageNum
     * @param domain
     * @return
     * @throws DataAccessException
     */
    public Map getPageRisk(AgentInfoModel curAgentInfoModel, OrdLogDomain domain) throws DataAccessException;

    /**
     * 根据查询条件获取交易记录
     *
     *
     * @param curAgentInfoModel
     * @param ordLogDomain
     * @return
     * @throws DataAccessException
     */
    public List<OrdLogModel> getListByOrdLogDomain(AgentInfoModel curAgentInfoModel, OrdLogDomain ordLogDomain) throws DataAccessException;
    /**
     * 查询今日交易记录
     * @param merchantId
     * @param transStatus
     * @param pageNum
     * @param pageSize
     * @param beginDate
     * @param endDate
     * @return
     */
    public Map<String, Object> getorderList(Map<String, Object> condition) ;
    
    public Map<String, Object> getAnalysisForHistoryMonth(String merchantId);
    /**
     * 获取首页数据信息
     * @param merchantId
     * @return
     */
    public Map<String, Object> homePageData(String merchantId) throws DataAccessException;
    /**
     * 运营分析数据
     * @param params
     * @return
     * @throws DataAccessException
     */
    public Map<String, Object> groupbyType(Map<String, Object> params) throws DataAccessException;
    /**
     * 获取价格区间的交易分步
     * @param params
     * @return
     * @throws DataAccessException
     */
    public List<Map<String, Object>> priceRange(Map<String, Object> params) throws DataAccessException;
    /**
     * 获取交易概览页信息
     * @param params
     * @return
     * @throws DataAccessException
     */
    public Map<String, Object> tradeInfo(Map<String, Object> params) throws DataAccessException;
}
